// 引入路由组合式
import { createRouter, createWebHashHistory } from 'vue-router'
// 引入动态路由
import dynamicRoutes from './dynamicRoutes.js'

let routes = [
    {
        path: "/login",
        component: () => import("@/pages/login/index.vue")
    },
    {
        path: "/",
        component: () => import('@/layout/index.vue'),
        children: dynamicRoutes
       
    },
    {
        path: '/:pathMatch(.*)*',
        component:()=>import('@/pages/page404/index.vue')
    }
]


let router = createRouter({
    routes,
    history: createWebHashHistory()
})
// 导出路由
export default router